﻿<navigation:Page
  x:Class="QLNS.Home" 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
  xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    	xmlns:local="clr-namespace:QLNS.Controls"

  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
  mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"  
  Style="{StaticResource PageStyle}">
    <UserControl.DataContext>
        <local:SiteMap>
            <local:SiteMap.Pages>
                <local:SitePage DisplayName="1" PageUri="/QLNS;component/Views/Employee.xaml" />
                <local:SitePage DisplayName="2" PageUri="/QLNS;component/Views/About.xaml" />
                <local:SitePage DisplayName="3" PageUri="/QLNS;component/Views/Login/LoginForm.xaml" />
            </local:SiteMap.Pages>
        </local:SiteMap>
    </UserControl.DataContext>

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/QLNS;component/Assets/TransitionResource.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <Style x:Key="FrameStyle" TargetType="sdk:Frame">
                <Setter Property="BorderBrush" Value="#FFD4D2D2" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="Background" Value="White" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="sdk:Frame">
                            <Grid Background="{TemplateBinding Background}">
                                <telerik:RadTransitionControl x:Name="PART_FrameCP" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}">
                                    <telerik:RadTransitionControl.Transition>
                                        <telerik:SlideAndZoomTransition />
                                    </telerik:RadTransitionControl.Transition>
                                </telerik:RadTransitionControl>
                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" />
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

        </ResourceDictionary>

    </UserControl.Resources>


    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <sdk:Frame Grid.Row="0" Style="{StaticResource FrameStyle}" Source="{Binding SelectedPage.PageUri}" NavigationFailed="Frame_NavigationFailed" />
        <Border Grid.Row="1" BorderBrush="#FFD4D2D2" Background="White" BorderThickness="1 0 1 1">
            <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                <telerik:RadButton Style="{StaticResource LeftArrowButton}" Command="{Binding SelectPreviousPage}" />
                <ListBox ItemsSource="{Binding Pages}" SelectedItem="{Binding SelectedPage, Mode=TwoWay}" DisplayMemberPath="DisplayName" VerticalAlignment="Center" Style="{StaticResource ListBoxStyle}" />
                <telerik:RadButton Style="{StaticResource RightArrowButton}" Command="{Binding SelectNextPage}" />
            </StackPanel>
        </Border>

    </Grid>

</navigation:Page>